Many security applications are based on deep packet inspection (DPI) to examine headers and payloads of data packets for security threats such as malicious code. Often, pattern matching is employed to examine the data packets. Pattern matching is a process by which received data is compared to stored data to determine whether a match exists between the received data and the stored data.